home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / Dreamweaver 3 / Configuration / Behaviors / Actions / Swap Image Restore.js < prev    next >
Encoding:
Text File  |  1999-12-01  |  1.1 KB  |  44 lines

  1. // Copyright 1998 Macromedia, Inc. All rights reserved.
  2.  
  3. //*************** GLOBALS VARS *****************
  4.  
  5. var helpDoc = MM.HELP_behSwapImageRestore;
  6.  
  7. //******************* BEHAVIOR FUNCTION **********************
  8.  
  9. //Included from file MM_swapImgRestore.js
  10.  
  11. //******************* API **********************
  12.  
  13.  
  14. //Checks for the existence of images.
  15. //If none exist, returns false so this Action is grayed out.
  16.  
  17. function canAcceptBehavior(){
  18.   var nameArray = getObjectRefs("NS 4.0","document","IMG");  //get array of image names
  19.   var retVal = (nameArray.length>0)?"onMouseOut,(onMouseOut)" : false;
  20.   return retVal;
  21. }
  22.  
  23.  
  24.  
  25. //Returns a Javascript function to be inserted in HTML head with script tags.
  26.  
  27. function behaviorFunction(){
  28.   return "MM_swapImgRestore";
  29. }
  30.  
  31.  
  32.  
  33. //Returns simple fn call, no args
  34. function applyBehavior() {
  35.   updateBehaviorFns("MM_findObj","MM_swapImage","MM_swapImgRestore"); //if existing swap functions outdated, update entire page
  36.   return "MM_swapImgRestore()";
  37. }
  38.  
  39.  
  40.  
  41. //Passed the function call above, does nothing (no args to handle)
  42. function inspectBehavior(){
  43. }
  44.